import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/article',
    children: [
      {
        path: '/article',
        name: 'article',
        component: () => import('../views/article/articleView.vue')
      }
    ]
  },
  {path: '/login', component: () => import('../views/LoginView')}

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
